﻿@model BankCreditPortfolio.Models.AccountModels.RegisterModel
@{
    ViewBag.Title = "Register";
}
<strong>Create a New Account</strong>
<p>
    Use the form below to create a new account.
</p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/Styles/forms.css")" rel="stylesheet" type="text/css" />

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
    <div>
        <fieldset>
            <legend>Account Information</legend>
            <div class="editor-label">
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.FirstName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.FirstName)
                @Html.ValidationMessageFor(m => m.FirstName)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.LastName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.LastName)
                @Html.ValidationMessageFor(m => m.LastName)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.MiddleName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.MiddleName)
                @Html.ValidationMessageFor(m => m.MiddleName)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.PersonalId)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.PersonalId)
                @Html.ValidationMessageFor(m => m.PersonalId)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.PassportDate)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.PassportDate, new { @id = "datefield", autocomplete="off"})
                @Html.ValidationMessageFor(m => m.PassportDate)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.PassportIssuingAuthority)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.PassportIssuingAuthority)
                @Html.ValidationMessageFor(m => m.PassportIssuingAuthority)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Address)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Address)
                @Html.ValidationMessageFor(m => m.Address)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Phone)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Phone)
                @Html.ValidationMessageFor(m => m.Phone)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Workplace)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Workplace)
                @Html.ValidationMessageFor(m => m.Workplace)
            </div>
            <p>Fields marked <b>bold</b> are required</p>
            <p>
                <input type="submit" value="Register" />
            </p>
        </fieldset>
    </div>
}
